//
//  YTKRequest+RAC.h
//  ADKit
//
//  Created by duzexu on 2017/11/29.
//  Copyright © 2017年 duzexu. All rights reserved.
//

#import <YTKNetwork/YTKNetwork.h>
#import <ReactiveObjC/ReactiveObjC.h>
#import "RACSubscriber+ADProgress.h"
#import "RACSignal+ADMap.h"

#define ADHTTPServiceErrorKey @"ADHTTPServiceErrorKey"

#define ADNetDataParseError @"返回数据异常"
#define ADNetConnectError @"网络异常，请检查网络连接"

@protocol ADRequestPraser

- (id)dataWithRequest:(YTKBaseRequest *)request;
- (NSError *)errorWithRequest:(YTKBaseRequest *)request;

@end

@interface YTKRequest (RAC)<ADRequestPraser>

- (RACSignal *)rac_start;

- (RACSignal *)rac_startWithReflectClass:(Class)cls;

- (RACSignal *)rac_origin_start;

@end
